package com.example.demo.controller;

import com.example.demo.service.EchoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class DemoController {

    @Value("${server.port}")
    private String port;

    @Autowired
    private EchoService echoService;

    @GetMapping("/")
    @ResponseBody
    public String test() {
        return "hello nacos consumer ==> " + echoService.echo();
    }


}
